home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
gsdbloo.exe
/
DEMOE008.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-03-02
|
2KB
|
78 lines
program DemoE008;
{------------------------------------------------------------------------------
Griffin Solutions Windows
Expanded Sample 8
Demo Program
Copyright (c) Richard F. Griffin
2 March 1992
102 Molded Stone Pl
Warner Robins, GA 31088
-------------------------------------------------------------
Demonstration program of Griffin Solutions use of Check_Func_Keys
virtual method to capture control of function key strokes. The
child virtual method will get the opportunity to handle function
keys before it passes control to the ancestor object. In this
example, if a function key is pressed, its number is displayed.
Otherwise, control is passed to edit the field on the screen.
********** Not For Use in a TurboVision Environment **********
-------------------------------------------------------------------------------}
uses
CRT,
GS_KeyI;
type
MyObjt = Object(GS_KeyI_Objt)
PROCEDURE Check_Func_Keys; virtual;
CONSTRUCTOR Init;
end;
var
MyKeyIn : MyObjt;
DumyStr : string;
CONSTRUCTOR MyObjt.Init;
begin
GS_KeyI_Objt.Init;
end;
PROCEDURE MyObjt.Check_Func_Keys;
var
i : integer;
begin
i := 0;
case Ch of
Kbd_F1 : i := 1;
Kbd_F2 : i := 2;
Kbd_F3 : i := 3;
Kbd_F4 : i := 4;
Kbd_F5 : i := 5;
Kbd_F6 : i := 6;
Kbd_F7 : i := 7;
Kbd_F8 : i := 8;
Kbd_F9 : i := 9;
Kbd_F10 : i := 10;
else GS_KeyI_Objt.Check_Func_Keys;
end;
if i > 0 then
begin
gotoxy(10,20);
write('':25);
gotoxy(10,20);
write('Function Key ',i,' Pressed');
end;
end;
begin
ClrScr;
MyKeyIn.Init;
DumyStr := 'TEST Line';
DumyStr := MyKeyIn.EditString(DumyStr,5,5,20);
end.